Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating to Platform 2.0.0 #66

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

wikumChamith
Copy link
Member

No description provided.

* compliance with the License. You may obtain a copy of the License at
* http://license.openmrs.org
*
* Software distributed under the License is distributed on an "AS IS"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you delete this file?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This class used org.openmrs.module.web.extension, unavailable on 2.0.0. Also, this class is not used in the code. That's why I removed it.
Should I revert this change and use the legacy UI module to provide org.openmrs.module.web.extension?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dkayiwa I think using the legacy UI module is better, so I updated the PR.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without this class, do the module's admin links still display on the admin page? https://qa-refapp.openmrs.org/openmrs/admin/index.htm

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't, I updated the PR.

@@ -211,7 +211,7 @@ protected Object task() {
return null;
}

}.executeInManualFlushMode();
}.executeInAutoFlushMode();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure this does not have any runtime side effects?

Copy link
Member Author

@wikumChamith wikumChamith Jan 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When we run this in AutoFlushMode we get the following error: https://gist.github.com/wikumChamith/1a1c66da05937e3883d0f7c922871218

This might be caused because we have added Transactional here: https://github.com/openmrs/openmrs-core/blob/889ccc1cf4d13b4e09ae9ff3ea6713cb685b3cef/api/src/main/java/org/openmrs/api/db/hibernate/HibernateContextDAO.java#L319-L322

I tested this and didn't notice any problems. I think there is a chance this could slightly affect the performance.

<dependency>
<groupId>org.simpleframework</groupId>
<artifactId>simple-xml</artifactId>
<version>2.7.1</version>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the scope for this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added this to the test scope

@@ -104,8 +110,8 @@ public void prepareImportServer() throws Exception {
@Override
public void runOnImportServerAfterImport() throws Exception {
Concept c = Context.getConceptService().getConcept(newConceptId);

Assert.assertNull("The concept was found with the same id, wha happened??", c);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mind explaining why you changed this?

Copy link
Member Author

@wikumChamith wikumChamith Feb 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In platform 2.0 Context.getConceptService().getConcept(newConceptId); returns the concept. That's why I had to change the test.


@Override
public List<?> prepareExportServer() throws Exception {

Concept c = new Concept();
c.addName(new ConceptName("Test", Locale.US));

c.addDescription(new ConceptDescription("Description", Locale.ENGLISH));
concept = c;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need the above line?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In platform 2.0, the concept must have a description otherwise it gives the following error when saving.

'Concept #null' failed to validate with reason: descriptions: Concept.description.atLeastOneRequired

@wikumChamith wikumChamith requested a review from dkayiwa February 10, 2024 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants